import request from '@/utils/request'

/**
 * @description: 保存采购退货单
 * @param {*} params
 * @return {*}
 */
export function saveCgthdOrder(data) {
  return request({
    url: '/order/cgthd/add',
    method: 'post',
    data
  })
}

/**
 * @description: 获取采购退货单清单
 * @param {*} data
 * @return {*}
 */
export function getCgthdOrderList(params) {
  return request({
    url: '/order/cgthd/list',
    method: 'get',
    params
  })
}

/**
 * @description: 获取采购退货单详情
 * @param {*} params
 * @return {*}
 */
export function getCgthdDetail(params) {
  return request({
    url: '/order/cgthd/detail',
    method: 'get',
    params
  })
}

/**
 * @description: 单据、反审核
 * @param {*} data
 * @return {*}
 */
export function examineCgthd(data) {
  return request({
    method: 'post',
    url: '/order/cgthd/examine',
    data
  })
}

/**
 * @description: 更新采购订单
 * @param {*} data
 * @return {*}
 */
export function updateCgthd(data) {
  return request({
    url: '/order/cgthd/update',
    method: 'post',
    data
  })
}

/**
 * @description: 采购退货单删除
 * @param {*} data
 * @return {*}
 */
export function deleteCgthd(data) {
  return request({
    url: '/order/cgthd/delete',
    method: 'post',
    data
  })
}
